Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-39760: Make NoDimensionsTask test utility consistent about storage classes. #346

Merged
merged 1 commit into from
Jun 23, 2023

Conversation

TallJimbo
Copy link
Member

@TallJimbo TallJimbo commented Jun 22, 2023

The config option provided by this task to change its output storage class actually only changes the Python type returned, making that type inconsistent with the storage class it declared in its connections. This means we've long been testing essentially the wrong behavior.

This also switches the default for outputSC from 'dict' to 'StructuredDataDict', since it's supposed to be a storage class name, not a pytype. This wasn't causing trouble, but it was very confusing.

Checklist

  • ran Jenkins
  • added a release note for user-visible changes to doc/changes (I'm considering this not-user-visible, I think?)

@codecov
Copy link

codecov bot commented Jun 22, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.06 ⚠️

Comparison is base (f9b488b) 82.59% compared to head (cf2b212) 82.54%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #346      +/-   ##
==========================================
- Coverage   82.59%   82.54%   -0.06%     
==========================================
  Files          66       66              
  Lines        7143     7148       +5     
  Branches     1393     1394       +1     
==========================================
  Hits         5900     5900              
- Misses        996     1001       +5     
  Partials      247      247              
Impacted Files Coverage Δ
python/lsst/pipe/base/tests/no_dimensions.py 0.00% <0.00%> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.


class NoDimensionsTestConfig(PipelineTaskConfig, pipelineConnections=NoDimensionsTestConnections):
"""Configuration for `NoDimensionTestTask`."""

key = Field[str](doc="String key for the dict entry the task sets.", default="one")
value = Field[int](doc="Integer value for the dict entry the task sets.", default=1)
outputSC = Field[str](doc="Output storage class requested", default="dict")
outputSC = Field[str](doc="Output Python type requested", default="StructuredDataDict")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The doc string is now wrong isn't it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yup, my first attempt at fixing this was just changing the docs, and then I forgot to revert that when I changed course.

The config option provided by this task to change its output storage
class actually only change the Python type returned, making that type
inconsistent with the storage class it declared in its connections.
This means we've long been testing essentially the wrong behavior.

This also switches the default for outputSC from 'dict' to
'StructuredDataDict', since it's supposed to be a storage class name,
not a pytype.  This wasn't causing trouble, but it was very confusing.
@TallJimbo TallJimbo merged commit edb96d1 into main Jun 23, 2023
@TallJimbo TallJimbo deleted the tickets/DM-39760 branch June 23, 2023 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants